package com.zxx.ssm.service;

import com.zxx.ssm.dao.Student;
import com.zxx.ssm.dao.StudentAvaliableTimeblock;
import com.zxx.ssm.dao.StudentAvaliableTimeblockExample;
import com.zxx.ssm.mapper.StudentAvaliableTimeblockMapper;
import com.zxx.ssm.model.biz.StuAvaTimeBiz;
import com.zxx.ssm.model.biz.StuAvaTimeblockBiz;
import com.zxx.ssm.service.core.IStuAvaTimeService;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class StuAvaTimeService extends AbstractService<StudentAvaliableTimeblock, StudentAvaliableTimeblockExample, Integer, StudentAvaliableTimeblockMapper> implements IStuAvaTimeService{

    public StuAvaTimeService(StudentAvaliableTimeblockMapper studentAvaliableTimeblockMapper){
        super(studentAvaliableTimeblockMapper);
    }

    public List<Student> getAvaTimeStu(Date curDay, Integer timeblockId) {
        return this.baseMapper.getAvaTimeStu(curDay, timeblockId);
    }

    public List<StuAvaTimeBiz> getAll(String stuName) {
        return this.baseMapper.getAll(stuName);
    }

    public List<StuAvaTimeblockBiz> getStuAvaTime(Integer stuId, Date firstDay, Date lastDay) {
        return this.baseMapper.getStuAvaTime(stuId, firstDay, lastDay);
    }
}
